<?php
        $xcrud = Xcrud::get_instance();
        $xcrud->table('post_text');
		
	    $xcrud->relation('cat_id','category','id','name','p_id = 0');
		$xcrud->relation('sub_id','category','id','name','','','',' ','','p_id','cat_id');
		$xcrud->relation('album_id','album','id','name');
		 
		$xcrud->change_type('sdes','textarea');
		
	    $xcrud->fields('id,alias,title,cat_id,sub_id,album_id, date_created,status', false, 'Thông Tin Chung');
   	    $xcrud->fields('sdes,description', false, 'Nội Dung');
		
		
		$xcrud->before_remove('xcrud_remove_post_text', 'function.php');
		$xcrud->before_update('xcrud_update_post_text', 'function.php');
		 
		$xcrud->table_name('Truyện Manage System');
		$xcrud->before_remove('', 'xcrud_remove_post_video', 'function.php');
		$xcrud->show_primary_ai_column(true);
		 echo $xcrud->render();


?>
